Summarization of a document

ABSTRACT

A method for summarizing a document is provided. A concept is detected for each sentence in said document. Relevance measures between the sentences are computed according to the detected concepts. And then a concept-aware graph is constructed, wherein a node in said graph represents a sentence in the document and an edge between two nodes represents a relevance measure between these two sentences.

BACKGROUND

With the development of information technology and networks such as Internet and intranets, more and more information exists online. The vast amount of online information may overwhelm a user who wants to find something that might be of interest to him. Hence, more attention has been paid to filtering out unnecessary information and receiving only the information needed. One method useful for such purposes is providing a summary of a document or summarizing a document so that the user may be allowed to preview the summary and decide whether it would be worthwhile to acquire and read the full document.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings illustrate various examples of various aspects of the present disclosure. It will be appreciated that the illustrated element boundaries (e.g., boxes, groups of boxes, or other shapes) in the figures represent one example of the boundaries. It will be appreciated that in some examples one element may be designed as multiple elements or that multiple elements may be designed as one element. In some examples, an element shown as an internal component of another element may be implemented as an external component and vice versa.

FIG. 1 is a block diagram of a system that may summarize a document according to an example of the present disclosure;

FIG. 2 is a process flow diagram for a method of summarizing a document according to an example of the present disclosure;

FIG. 3 is a more detailed process flow diagram for a method of summarizing a document according to an example of the present disclosure;

FIG. 4 is a block diagram showing a non-transitory, computer-readable medium that stores code for summarizing a document according to an example of the present disclosure.

DETAILED DESCRIPTION

Automatic summarization has long been an important task for natural language processing. A good summary of a document should be concise and accurate, in other words, capable of capturing the important information of the source documents. Until now, various kinds of methods have been proposed. Broadly, there are two kinds of approaches for summary generation: extraction and abstraction. Extraction methods focus on selecting sentences from a single document or multiple documents while abstraction methods generate new sentences by employing various technologies of paraphrasing.

As used in this disclosure, a “document” refers to any body of free, unstructured or semi-structured text. The text can include the entire content of a document in its general sense, such as a book, an article, a paper, or the like- or a portion of a traditional document, such as an abstract, a paragraph, a sentence, or a phrase, for example, a title. Ideally, a “document” describes a coherent topic. Thus, throughout this disclosure, the term “document” is used broadly to signify a unit of text data, which is inclusive of merely a portion of a document, such as a section, or a paragraph. In addition, a “document” can encompass text generated from an image or other graphics, as well as text recovered from audio or video formats. A document generally can include a number of sentences. Similarly, the word “term” is used broadly throughout this disclosure to signify a word or a grouping of words that is topically related to a document, or a document collection.

In the following, certain examples according to the present disclosure are described in detail with reference to the drawings.

With reference to FIG. 1, FIG. 1 is a block diagram of a system that may summarize a document according to an example of the present disclosure. The system is generally referred to by the reference number 100. Those of ordinary skill in the art will appreciate that the functional blocks and devices shown in FIG. 1 may comprise hardware elements including circuitry, software elements including computer code stored on a tangible, machine-readable medium, or a combination of both hardware and software elements. Additionally, the functional blocks and devices of the system 100 are but one example of functional blocks and devices that may be implemented in an example. Those of ordinary skill in the art would readily be able to define specific functional blocks based on design considerations for a particular electronic device.

The system 100 may include a server 102, and one or more client computers 104, in communication over a network 106. As illustrated in FIG. 1, the server 102 may include one or more processors 108 which may be connected through a bus 110 to a display 112, a keyboard 114, one or more input devices 116, and an output device, such as a printer 118. The input devices 116 may include devices such as a mouse or touch screen. The processors 108 may include a single core, multiple cores, or a cluster of cores in a cloud computing architecture. The server 102 may also be connected through the bus 110 to a network interface card (NIC) 120. The NIC 120 may connect the server 102 to the network 106.

The server 102 can access to various documents through the network 106 and the input device 116. For example, a user may input a document(s) for which a summary is to be generated through the input device 116. Or the server 102 can search for a number of documents from the Internet by using some searching engines like Google. The server 102 also has access to a concept library 130. The concept library 130 can be but not limited to some publicly available concept libraries such as Wikipedia, Baidu Baike, BabelNet, etc. A user can also define his own concept library. In the following description, Wikipedia will be used as an example for illustration. However, those skilled in the art will appreciate that Wikipedia only serves as an example and the present invention is not limited in this regard. Noted that Wikipedia contains more than 350 million manually edited concepts and a Wikipedia concept is represented as a article page in Wikipedia.

The network 106 may be a local area network (LAN), a wide area network (WAN), or another network configuration. The network 106 may include routers, switches, modems, or any other kind of interface device used for interconnection. The network 106 may connect to several client computers 104. Through the network 106, several client computers 104 may connect to the server 102. The client computers 104 may be similarly structured as the server 102.

The server 102 may have other units operatively coupled to the processor 108 through the bus 110. These units may include tangible, machine-readable storage media, such as storage 122. The storage 122 may include any combinations of hard drives, read-only memory (ROM), random access memory (RAM), RAM drives, flash drives, optical drives, cache memory, and the like. Storage 122 may include a concept detection unit 124, a relevance computation unit 126 and a graph construction unit 128. The concept detection unit 124 may detect a concept(s) in a sentence of a document. A concept in a sentence is defined as words and phrases that present some semantics of the sentence. The concept detection unit 124 can detect concepts in each and every sentence of the document. The relevance computation unit 126 can compute relevance measures between the sentences according to the concepts detected in these sentences. The graph construction unit 128 can construct a concept-aware graph based on the computed relevance measures, wherein a node in said concept-aware graph represents a sentence in the document and an edge between two nodes represents a relevance measure between these two sentences.

Although not shown in FIG. 1, the storage 122 can also include some other units, such as a preprocessing unit, a ranking unit and a summary generating unit. The preprocessing unit can perform some preprocessing on the target document. For example, said preprocessing can include removing illegal characters from a sentence, e.g. Chinese characters in an English article might be considered as illegal characters and should be removed. The preprocessing can also include removing words like interjection from a sentence because these words normally do not contribute to the meaning of a sentence. Of course, there could be some other types of preprocessing, which will not be described in detail herein. The ranking unit may run a ranking method on the concept-aware graph constructed by the graph construction unit 128 and give a score to each sentence (i.e. ranking). The higher a score of a sentence is, the more important the sentence is. In this way, all the sentences in a document can be sorted according to their scores. Examples of the ranking method can include but not limited to HITS Rank, Google's PageRank and manifoldrank. After each sentence is scored by the ranking unit, sentences can be selected in order according to their ranks. The summary generating unit can choose the top ranking sentences as a summary for the document. According to an example of the present disclosure, when a sentence is selected, this sentence can be compared with already selected sentences to check whether this sentence is too close or similar to one of the already selected sentences. If they are too similar, this sentence will not be selected into the summary (i.e. selecting those sentences that are not similar but important). The generated summary can be displayed on the display 112 for view by the user or sent to the printer 118 to be printed.

With reference to FIG. 2 now, FIG. 2 illustrates a process flow diagram for a method of summarizing a document according to an example of the present disclosure. The method is generally referred to by the reference number 200. At block 201, a concept(s) is detected for each sentence in a document. According to an example of the present disclosure, a concept in a sentence is detected based on a predefined concept library, which comprises a number of reference concepts. For example, said predefined concept library can be but not limited to Wikipedia and each Wikipedia page is a reference concept. Thus, in this example, Wikipedia is used as an ontology to detects concepts that are used to express the original sentences. According to an example, detecting a concept in a sentence involves two aspects. First, concepts candidates are obtained for a term in a sentence by simple matching. That is, the term is compared with an article name of a Wikipedia page to see if they match with each other. If they match, then this Wikipedia page (i.e. a Wikipedia concept) is a candidate concept for this term. Then, an operation of disambiguation can be performed over those candidate concepts to get the most similar Wikipedia concept for each term, because a term can have multiple meanings and cause ambiguity. For example, from a sentence of “iphone is a product of apple inc.”, two concepts may be detected: “iphone” and “apple”. However, the word “apple” may have two kinds of concepts associated with it: a fruit and a company. In this case, the context information (e.g. “iphone”) of the word “apple” can be analyzed to further determine that “apple” in this sentence represents the company.

At block 202, after concepts are detected in each sentence, relevance measures between the sentences are computed according to the detected concepts. According to an example of the present disclosure, relevance measures between the sentences are computed according to the reference concepts (e.g. Wikipedia concepts) in said concept library corresponding to the detected concepts. At block 203, a concept-aware graph is constructed, wherein a node in said graph represents a sentence in the document and an edge between two nodes represents the computed relevance measure between these two sentences. As described before, after the concept-aware graph is constructed, some ranking method can be run on the graph to rank the sentences and then some post-processing operations such as removing very similar sentences can be performed and finally a summary is generated by choosing a number of top ranking sentences.

With reference to FIG. 3 now, FIG. 3 illustrates a more detailed process flow diagram for a method of summarizing a document according to an example of the present disclosure. The method is generally referred to by the reference number 300. The method 300 starts at block 301. At block 302, a document to be summarized is selected. This document can be input by a user or can be from a searching result. At block 303, the document is preprocessed. For example, illegal words and interjections are removed from the document. At block 304, a concept(s) is detected in each sentence of the document based on a predefined concept library such as Wikipedia, which includes a number of reference concepts such as Wikipedia pages. As described above, detecting a concept can involve obtaining concept candidates and disambiguation and will not be described in detail herein. At block 305, it is determined whether the current sentence contains any concept or not. If no concept is detected in a sentence, then this sentence will be ignored, as shown at block 306. At block 307, if concepts are detected in a sentence, then respective weights are assigned to the detected concepts. According to an example of the present disclosure, a weight represents a degree of similarity between the detected concept and its corresponding reference concept in the concept library. The weight can be a value ranging from 0 to 1, for example.

Taking Wikipedia for example. Suppose that the sentence being processed is “On Oct. 31, 1999, a plane carrying 217 mostly Egyptian passengers crashed into the Atlantic Ocean off Massachusetts”. The results obtained by detecting concepts in this sentence with the use of Wikipedia can be:

<DetectedTopic id=“698” title=“Atlantic Ocean” weight=“0.909”/>

<DetectedTopic id=“1645518” title=“Massachusetts” weight=“0.807”/>

<DetectedTopic id=“34553” title=“1999” weight=“0.678”/>

wherein, the “title” represents the title of a Wikipedia page, the “DetectedTopic id” represents an indexing id of this Wikipedia page, and the “weight” represents a degree of similarity between the detected concept in the sentence and a corresponding Wikipedia page.

In this way, a sentence S_(i) can be expressed by a vector: S_(i)={C_(ik):Score_(ik)}, wherein S_(i) represents the i^(th) sentence in the document, C_(ik) represents the k^(th) concept detected in the i^(th) sentence, which is a Wikipedia concept (i.e. article ID in Wikipedia); and Score_(ik) represents its similarity value to the sentence S_(i) (i.e. the weight). The above sentence then can be expressed in the following form:

$S = \begin{Bmatrix} {698\text{:}\mspace{11mu} 0.909} \\ {1645518\text{:}\mspace{11mu} 0.807} \\ {34553\text{:}\mspace{11mu} 0.678} \end{Bmatrix}$

Although not shown in FIG. 3, according to an example, a threshold can be set for the weights and if an weight assigned to a detected concept is less then said threshold, this detected concept is ignored. In an example, the threshold can be set to 0.6.

Then the method 300 proceeds from block 307 to block 308, where it is determined whether all the sentences are processed or not. If not, the method 300 returns to block 304. If all the sentences are processed, then the method 300 proceeds to block 309, where relevance measures between the sentences are computed according to the detected concepts. According to an example of the present disclosure, the relevance measure between two sentences is computed as a function of weights of concepts detected in these two sentences and relevance measures between reference concepts in said concept library corresponding to the detected concepts. In one example, a relevance measure between two reference concepts in said concept library is represented by the number of linked-in addresses shared by these reference concepts. Taking Wikipedia as an example of concept library again. If we search for two concepts “ipod” and “itouch” in Wikipedia, then we will get two Wikipedia pages related to these two concepts respectively and within these two pages there will be some common or shared linked-in addresses. For instance, a linked-in address of “Apple Inc.” may be shared by these two pages. Of course, other shared linked-in addresses are possible. In this example, the number of these shared linked-in address can be used as a measure for relevance between these two Wikipedia concepts (i.e. reference concepts). According to an example, if there are two sentences S_(i) and S_(j), which are represented by a vector respectively, such as S_(i)={C_(ik):Score_(ik)} and S_(j)={C_(jl):Score_(jl)}, then the above described function can be in the following form:

${{Rel}({ij})} = {\sum\limits_{kl}^{\;}\;{{Score}_{ik}{Score}_{jl}{{Rel}\left( {C_{ik}C_{jl}} \right)}}}$ wherein, Rel(ij) represents the relevance measure between two sentences S_(i) and S_(j), Rel(C_(ik)C_(jl)) represents the relevance between two Wikipedia concepts C_(ik) and C_(jl). Assuming that there are two concepts in sentence S_(i) and three concepts in sentence S_(j), then the above formula would become: Rel(i,j)=score_(i1)score_(j1)Rel(c _(i1) C _(j1))+score_(i2)score_(j1)Rel(c _(i2) C _(j1))+score_(i1)score_(j2)Rel(c _(i1) C _(j2))+score_(i2)score_(j2)Rel(c _(i2) C _(i2))+score_(i1)score_(j3)Rel(c _(i1) C _(j3))+score_(i2)score_(j3)Rel(c _(i2) C _(j3))

Taking the second term for example. Score_(i2) is the weight of the second concept c_(i2) in sentence i, score_(j1) is the weight of the first concept C_(j1) in sentence j and Rel(c_(i2)C_(j1)) is the number of linked-in addresses shared by these two Wikipedia concepts (i.e. wikipedia pages). Although Wikipedia is used in this example, those skilled in the art will appreciate that other concept library can be used as well and the relevance measure between two concepts or between two sentences can be defined accordingly without departing from the scope of the present invention.

The method 300 then proceed from block 309 to block 310, where a concept-aware graph is constructed, wherein each node in said graph represents a sentence in the document and an edge between two nodes represents the relevance measure between these two sentences computed in block 308. At block 311, after the concept-aware graph is constructed, some ranking method can be run on the graph to rank the sentences. At block 312, a summary can be generated by choosing a number of top ranking sentences. The method 300 ends at block 313.

By using the feature of concepts, examples of the present disclosure can help capture the semantic relationship between sentences, which is very hard, if not impossible, for the term-overlap-based methods to capture.

With reference to FIG. 4 now, FIG. 4 is a block diagram showing a non-transitory, computer-readable medium that stores code for summarizing a document according to an example of the present disclosure. The non-transitory, computer-readable medium is generally referred to by the reference number 400.

The non-transitory, computer-readable medium 400 may correspond to any typical storage device that stores computer-implemented instructions, such as programming code or the like. For example, the non-transitory, computer-readable medium 400 may include one or more of a non-volatile memory, a volatile memory, and/or one or more storage devices. Examples of non-volatile memory include, but are not limited to, electrically erasable programmable read only memory (EEPROM) and read only memory (ROM). Examples of volatile memory include, but are not limited to, static random access memory (SRAM), and dynamic random access memory (DRAM). Examples of storage devices include, but are not limited to, hard disks, compact disc drives, digital versatile disc drives, and flash memory devices.

A processor 402 generally retrieves and executes the computer-implemented instructions stored in the non-transitory, computer-readable medium 400 for summarizing a document. At block 404, a concept detection module detects a concept(s) in each sentence of said document. At block 406, a relevance computation module computes relevance measures between the sentences according to the detected concepts. At block 408, a graph construction module constructs a concept-aware graph so that a ranking method can be run on the graph to rank the sentences and generate a summary, wherein a node in said graph represents a sentence in the document and an edge between two nodes represents a relevance measure between these two sentences, as described above.

According to another example of the present disclosure, a system for summarizing a document is provided. The system comprises: a processor that is adapted to execute stored instructions; and a memory device that stores instructions. The memory device comprises processor-executable code, that when executed by the processor, is adapted to: detect, for each sentence in said document, a concept in said sentence; according to the detected concepts, compute relevance measures between the sentences;

construct a concept-aware graph, wherein a node in said graph represents a sentence in the document and an edge between two nodes represents a relevance measure between these two sentences.

The above examples can be implemented by hardware, software or firmware or a combination thereof. For example the various methods, processes and functional modules described herein may be implemented by a processor (the term processor is to be interpreted broadly to include a CPU, processing unit, ASIC, logic unit, or programmable gate array etc.). The processes, methods and functional modules may all be performed by a single processor or split between several processers; reference in this disclosure or the claims to a ‘processor’ should thus be interpreted to mean ‘one or more processors’. The processes, methods and functional modules may be implemented as machine readable instructions executable by one or more processors, hardware logic circuitry of the one or more processors or a combination thereof. Further the teachings herein may be implemented in the form of a software product. The computer software product is stored in a storage medium and comprises a plurality of instructions for making a computer device (which can be a personal computer, a server or a network device such as a router, switch, access point etc.) implement the method recited in the examples of the present disclosure.

From the above depiction of the implementation mode, the above examples can be implemented by hardware, software or firmware or a combination thereof. For example the various methods, processes, modules and functional units described herein may be implemented by a processor (the term processor is to be interpreted broadly to include a CPU, processing unit, ASIC, logic unit, or programmable gate array etc.) The processes, methods and functional units may all be performed by a single processor or split between several processers. They may be implemented as machine readable instructions executable by one or more processors. Further the teachings herein may be implemented in the form of a software product. The computer software product is stored in a storage medium and comprises a plurality of instructions for making a computer device (which can be a personal computer, a server or a network device, etc.) implement the method recited in the examples of the present disclosure.

The figures are only illustrations of an example, wherein the modules or procedure shown in the figures are not necessarily essential for implementing the present disclosure. Moreover, the sequence numbers of the above examples are only for description, and do not indicate an example is more superior to another.

Those skilled in the art can understand that the modules in the device in the example can be arranged in the device in the example as described in the example, or can be alternatively located in one or more devices different from that in the example. The modules in the aforesaid example can be combined into one module or further divided into a plurality of sub-modules. 

The invention claimed is:
 1. A method for summarizing an electronic document, comprising: detecting via a processor, for each sentence in said document, a concept in said sentence; associating, via the processor, each detected concept with a weight, wherein said weight represents a degree of similarity between the detected concept and its corresponding reference concept in a concept library available over the internet; representing, via the processor, each sentence with a vector comprising concept-weight pairs; according to the detected concepts, computing relevance measures between the sentences, wherein the relevance measures are based on a respective vector representation of each sentence; constructing a concept-aware graph, wherein a node in said graph represents each said sentence in the document and an edge between two nodes represents the relevance measure between two sentences represented by the two nodes; utilizing the concept-aware graph to rank the sentences in the document; summarizing the document by selecting representative sentences based on the ranks; and providing, via the processor, the summarized document to a user to enable the user to make a determination if the electronic document is to be downloaded from the internet.
 2. The method of claim 1, wherein the detecting a concept in a sentence is performed based on a predefined concept library, which comprises a number of reference concepts.
 3. The method of claim 2, wherein computing the relevance measures between the sentences comprises: computing said relevance measure according to reference concepts in said concept library corresponding to the detected concepts.
 4. The method of claim 1, wherein computing the relevance measure between sentences comprises: computing said relevance measure as a function of weights of concepts detected in the sentences and relevance measures between reference concepts in said concept library corresponding to the detected concepts.
 5. The method of claim 1, wherein the detected concept is included in the vector representation if the associated weight of the concept exceeds a threshold.
 6. The method of claim 1, further comprising determining relevance scores between the detected concepts, and wherein the relevance measures between two sentences are based on the relevance scores between pairs of the detected concepts in the sentences.
 7. A system for summarizing a document, the system comprising: a processor that is adapted to execute stored instructions; and a memory device that stores instructions, the memory device comprising processor-executable code, that when executed by the processor, is adapted to: detect, for each sentence in said document, a concept in said sentence; associate each detected concept with a weight, wherein said weight represents a degree of similarity between the detected concept and its corresponding reference concept in a concept library available over the Internet; represent each sentence with a vector comprising concept-weight pairs; according to the detected concepts, compute relevance measures between the sentences, wherein the relevance measures are based on a respective vector representation of each sentence; construct a concept-aware graph, wherein a node in said graph represents each said sentence in the document and an edge between two nodes represents the relevance measure between two sentences represented by the two nodes; utilize the concept-aware graph to rank the sentences in the document; and summarize the document by selecting representative sentences based on the ranks.
 8. The system of claim 7, wherein the code is to detect a concept in a sentence based on a predefined concept library, which comprises a number of reference concepts.
 9. The system of claim 8, wherein the code is adapted to compute the relevance measures between the sentences by: computing said relevance measure according to reference concepts in said concept library corresponding to the detected concepts.
 10. The system of claim 7, wherein the code is adapted to compute the relevance measure between the sentences by: computing said relevance measure as a function of weights of concepts detected in the sentences and relevance measures between reference concepts in said concept library corresponding to the detected concepts.
 11. The system of claim 7, wherein the detected concept is included in the vector representation if the associated weight of the concept exceeds a threshold.
 12. The system of claim 7, further comprising instructions adapted to determine relevance scores between the detected concepts, and wherein the relevance measures between two sentences are based on the relevance scores between pairs of the detected concepts in the sentences.
 13. A non-transitory, computer-readable medium, comprising code to direct a processor to: detect, for each sentence in a document which comprises a plurality of sentences, a concept in said sentence; associate each detected concept with a weight, wherein said weight represents a degree of similarity between the detected concept and its corresponding reference concept in a concept library available over the internet; represent each sentence with a vector comprising concept-weight pairs; according to the detected concepts, compute relevance measures between the sentences, wherein the relevance measures are based on a respective vector representation of each sentence; construct a concept-aware graph, wherein a node in said graph represents the sentence in the document and an edge between two nodes represents the relevance measure between two sentences represented by the two nodes; utilize the concept-aware graph to rank the sentences in the document; generate a summary for said document based on said ranked sentences; and provide the summarized document to a user to enable the user to make a determination if the electronic document is to be downloaded from the internet.
 14. The non-transitory, computer-readable medium of claim 13, wherein the code to detect a concept in a sentence is based on a predefined concept library, which comprises a number of reference concepts.
 15. The non-transitory, computer-readable medium of claim 13, wherein the detected concept is included in the vector representation if the associated weight of the concept exceeds a threshold.
 16. The non-transitory, computer-readable medium of claim 13, wherein the code determines relevance scores between the detected concepts, and wherein the relevance measures between two sentences are based on the relevance scores between pairs of the detected concepts in the sentences. 